<template>
  <div>
    <V-CommonHeaderLeft>
      <div id="app">
        <el-row>
          <!-- 头部 -->
          <div class="header">
            <el-col :span="4" class="header-nav">
              <router-link to="/">首页&nbsp;&nbsp;/</router-link>
              <router-link to="/">应用&nbsp;&nbsp;/</router-link>
              <router-link to="/">修改参考进价</router-link>
            </el-col>
            <el-col :span="1" :offset="18">
              <img src alt class="shuImg">
            </el-col>
          </div>
        </el-row>
        <div class="content">
          <div class="contents-header">
            <p>
              <span>1</span>
              <span>上传导入文件</span>
            </p>
            <p>
              <span>2</span>
              <span>预览导入数据</span>
            </p>
            <p>
              <span>3</span>
              <span>导入完成</span>
            </p>
          </div>
          <div class="center">
            <p>仅预览前100条数据</p>
            <table class="centerTable">
              <tr>
                <td>商品名称/商品编号</td>
                <td>规格/规格编号</td>
                <td>商品分类</td>
                <td>参考进价</td>
                <td>(改)参考进价</td>
              </tr>
              <tr v-for="(site,key) in tableData" :key="key">
                <td>
                  <span>{{site.goodsName}}</span>
                  <span>{{site.goodsBian}}</span>
                </td>
                <td>
                  <span>{{site.guiName}}</span>
                  <span>{{site.guiBian}}</span>
                </td>
                <td>{{site.goods}}</td>
                <td></td>
                <td></td>
              </tr>
            </table>
          </div>
        </div>
        <div class="footer">
          <button @click="requires()">确定导入</button>
          <button @click="goBack()">上一步</button>
        </div>
      </div>
    </V-CommonHeaderLeft>
  </div>
</template>

<script>
import VCommonHeaderLeft from './../common/vCommonHeaderLeft/VCommonHeaderLeft'
export default {
  components: {
    VCommonHeaderLeft
  },
  data () {
    return {
      tableData: [{
        goodsName: 'hair shampome',
        goodsBian: '1',
        guiName: '1',
        guiBian: '1',
        goods: '面膜'
      }]
    }
  },
  methods: {
    goBack () {
      this.$router.go(-1)
    },
    requires () {
      this.$router.push({
        // 失败
        // path: '/applicationDao'
        // 成功
        path: '/applicationDaosu'
      })
    }
  }
}
</script>

<style lang="scss" scoped>
#app {
  width: 100%;
  background-color: #f2f5f7;
  height: 100%;
  padding: 15px 10px 0px 10px;
}
.header {
  height: 45px;
  .header-nav {
    line-height: 30px;
    font-size: 12px;
    display: flex;
    justify-content: space-around;
    padding-left: 10px;
    span {
      display: inline-block;
      margin-left: 10px;
    }
    a {
      color: #999999;
    }
    a:hover {
      color: #20ade5;
    }
  }
  .header-img {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: 1px solid #dce4e7;
  }
}
.header-nav a:nth-child(3) {
  color: #333;
}
.header-nav a:nth-child(3):hover {
  color: #333;
}
.shuImg {
  width: 20px;
  height: 20px;
  border: 1px solid;
}
.content {
  padding: 30px 30px 0px 30px;
  background-color: #fff;
  height: 450px;
  overflow-x: hidden;
  overflow-y: scroll;
}
.contents-header {
  display: flex;
  justify-content: space-between;
}
.contents-header > p {
  width: 365px;
  height: 50px;
  font-size: 14px;
  text-align: center;
  line-height: 50px;
}
.contents-header > p:nth-child(1) {
  background-color: #c9e5ff;
  color: #20ade5;
}
.contents-header > p span:nth-child(1) {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  text-align: center;
  line-height: 25px;
  display: inline-block;
  margin-right: 10px;
  color: #fff;
}
.contents-header > p:nth-child(1) span:nth-child(1) {
  background-color: #20ade5;
}
.contents-header > p:nth-child(2) {
  background-color: #c9e5ff;
  color: #20ade5;
}
.contents-header > p:nth-child(2) span:nth-child(1) {
  background-color: #20ade5;
}
.contents-header > p:nth-child(3) {
  background-color: #fbfbfb;
}
.contents-header > p:nth-child(3) span:nth-child(1) {
  background-color: #e3e3e3;
}
.center > p {
  color: #9f9e9f;
  margin: 50px 0px 20px 0px;
}
.centerTable {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.centerTable > tr:nth-child(1) {
  height: 45px;
  background-color: #fbfbfb;
}
.centerTable > tr:nth-child(2) {
  height: 60px;
  border-bottom: 1px solid #e3e3e3;
}
.centerTable span {
  display: block;
}
.footer {
  width: 100%;
  background-color: #fff;
  border-top: 1px solid #e3e3e3;
  height: 60px;
}
.footer > button {
  width: 155px;
  height: 45px;
  background-color: #20ade5;
  font-size: 14px;
  color: #fff;
  border: 0;
  text-align: center;
  line-height: 45px;
  float: right;
  margin: 10px 15px 0px 0px;
  border-radius: 5px;
  cursor: pointer;
}
.footer > button:nth-child(2) {
  background-color: #fff;
  border: 1px solid #20ade5;
  color: #20ade5;
}
</style>
